package zzz.tuan2d.toidihoilo;

import java.util.ArrayList;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class ListCategoryActivity extends BaseActivity {

	private ListView mListViewCategoryActivity;
	private ListCategoryAdapter mCategoryAdapter;
	private ArrayList<CategoryModel> mListCategory;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_list_category);

		initHeader("");

		mListCategory = new ArrayList<CategoryModel>();
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));
		mListCategory.add(new CategoryModel("Giáo dục", "+70"));

		mCategoryAdapter = new ListCategoryAdapter(this, mListCategory);

		mListViewCategoryActivity = (ListView) findViewById(R.id.listViewCategory);
		mListViewCategoryActivity.setAdapter(mCategoryAdapter);

		mListViewCategoryActivity
				.setOnItemClickListener(new OnItemClickListener() {

					@Override
					public void onItemClick(AdapterView<?> arg0, View arg1,
							int arg2, long arg3) {
						startActivity(new Intent(ListCategoryActivity.this,
								ListReportActivity.class));
					}

				});
	}
}
